import txios from '../../index'

enum DashboardAPI {
  categoryGoodsCount = '/goods/category/count',
  categoryGoodsSale = '/goods/category/sale',
  categoryGoodsFavor = '/goods/category/favor',
  addressGoodsSale = '/goods/address/sale'
}

export function getCategorygoodsCount() {
  return txios.get({
    url: DashboardAPI.categoryGoodsCount,
    interceptorHooks: {
      responseInterceptor: (res) => {
        return res.data
      }
    }
  })
}
export function getCategorygoodsSale() {
  return txios.get({
    url: DashboardAPI.categoryGoodsSale,
    interceptorHooks: {
      responseInterceptor: (res) => {
        return res.data
      }
    }
  })
}
export function getCategorygoodsFavor() {
  return txios.get({
    url: DashboardAPI.categoryGoodsFavor,
    interceptorHooks: {
      responseInterceptor: (res) => {
        return res.data
      }
    }
  })
}
export function getCategoryAddressSale() {
  return txios.get({
    url: DashboardAPI.addressGoodsSale,
    interceptorHooks: {
      responseInterceptor: (res) => {
        return res.data
      }
    }
  })
}
